<template>
  <div>
    <el-card class="card-statistics">
      <el-tabs
        v-model="activeName"
        class="demo-tabs-statistics"
        @tab-click="handleClick"
      >
        <el-tab-pane label="按知识本体统计" name="first">
          <onyologyStatis></onyologyStatis>
        </el-tab-pane>
        <el-tab-pane label="按知识分类统计" name="second" lazy>
          <knowledgeStatis></knowledgeStatis>
        </el-tab-pane>
      </el-tabs>
    </el-card>
  </div>
</template>

<script setup lang="ts">
import { ref } from "vue";
import type { TabsPaneContext } from "element-plus";
import onyologyStatis from "@/views/statisticsKg/analysis/onyologyStatis.vue";
import knowledgeStatis from "@/views/statisticsKg/analysis/knowledgeStatis.vue";

const activeName = ref("first");

const handleClick = (tab: TabsPaneContext, event: Event) => {
  console.log(tab, event);
};
</script>

<style lang="scss" scoped>
::v-deep.demo-tabs-statistics {
  .el-tabs__nav-wrap::after {
    height: 0;
  }

  .el-tabs__item.is-top {
    font-size: 16px;
  }

  .el-tabs__item.is-top.is-active {
    font-weight: bold;
    color: #2b1dff;
  }

  .el-tabs__active-bar.is-top {
    background-color: #2b1dff;
  }
}

::v-deep .card-statistics {
  .el-card__body {
    padding: 24px;
  }
}
</style>
